package com.you.springcloudconfig.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Linzk on 2020/12
 */
@RestController
// @RefreshScope // 开启刷新功能
@RequestMapping("/client-provider")
public class ConfigClientController {

    // @Value("${name}")
    // private String name; // 获取远程 Gitee 仓库中配置的属性

    /**
     * 创建一个controller接口去请求一下
     */
    @RequestMapping("/config")
    public String getConfig() {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            System.out.println("异常：" + e);
        }
        return "provider:";
    }



}
